#ifndef __COM_ANIM_H__
#define __COM_ANIM_H__

#include "sys_port.h"
#include "page_base.h"

#define LOADING_NUM  (18)

typedef int (*anim_callback)(void* user_data);

typedef struct
{
    int          index;
    lv_obj_t*    img;
    lv_timer_t*  time;

    lv_img_dsc_t loading_img[LOADING_NUM];

    anim_callback user_cb;
    void*         user_data;
}com_anim_t;

int com_loading_res_init(void);
int com_loading_res_deinit(void);

int com_anim_create(lv_obj_t* parent,lv_coord_t x,lv_coord_t y,anim_callback user_cb,void* user_data);
int com_anim_destroy(void);

#endif
